import { defineStore } from "pinia";
import { ref, computed } from "vue";

// 创建公共状态库
export let useCount = defineStore("main", () => {
  let params = ref({
  });

  // 修改请求对象的参数
  let changeParams = (newParams) => {
    // console.log(newParams);
    params.value = { ...params.value, ...newParams };
    console.log(params.value);
  };


  // 将响应数据暴露出去
  return {
    params,
    changeParams,
  };
});
